#line 1 "C:/Users/Maxime/Documents/Progc/18f2520/uart/UART.c"






char text[] = "uart donnee";
char chiffre[2] ;
char i;
char j=0;

void main() {
 PORTB=0x00;
 TRISB=0x00;


 UART1_Init(9600);
 Delay_ms(100);

  PORTB.RB0 =1;





 Delay_ms(1000);
  PORTB.RB0 =0;

 while (1) {
  PORTB.RB1 =1;


 delay_ms(1000);
  PORTB.RB1 =0;

  PORTB.RB2 =1;
 for(i=0;i<100;i++){
  PORTB.RB3 =1;
 chiffre[1]=(i%10)+48;
 chiffre[0]=((int)(i/10))+48;


 UART1_Write(chiffre[0]);

 UART1_Write(chiffre[1]);
 UART1_Write(' ');
  PORTB.RB3 =0;
  PORTB.RB4 =1;
 Delay_ms(1000);
  PORTB.RB4 =0;

 }
  PORTB.RB2 =0;
 }
}
